/*
 * Copyright 2014, NuzoweR@Schneefeuer <nuzower@gmail.com>.
 * The Settlers Online - Combat Simulator (tsosim).
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef DEBUG_H_
#define DEBUG_H_

#include <ostream>
#include <string>

namespace debug
{
	enum DebugLevel { DL_DEBUG=-1, DL_INFO=0, DL_WARNING=1, DL_ERROR=2 };

	bool SetLevel(std::string const& dl);
	void SetLevel(DebugLevel dl);
	DebugLevel GetLevel();

	bool CheckLevel(DebugLevel dl);

	/* ************************************* */

	std::ostream& ERROR  (std::ostream& out, int line, std::string const& message);
	std::ostream& WARNING(std::ostream& out, int line, std::string const& message);
	std::ostream& INFO   (std::ostream& out, int line, std::string const& message);
	std::ostream& DEBUG  (std::ostream& out, int line, std::string const& message);
}

#endif /* DEBUG_H_ */
